package com.boby.homecamera.constant;

import android.os.Environment;

public class Constant {
    public static  String RECORD_FILE_DIR = Environment.getExternalStorageDirectory().getAbsolutePath()+"/record/video/";
    public static  String RECORD_FILE_PIC_DIR = Environment.getExternalStorageDirectory().getAbsolutePath()+"/record/pic/";
    public static  String DB_DIR = Environment.getExternalStorageDirectory().getAbsolutePath()+"/record/db/";
    public static int HTTP_SERVER_PORT = 9200;
    public static int RTSP_PORT = 9201;
    public static int WEBSOCKET_PORT = 9202;


    public final static int DEVICE_MODEL_UNSELECT = 0;
    public final static int DEVICE_MODEL_SERVER = 1;
    public final static int DEVICE_MODEL_CLIENT = 2;

    public static class ErrorCode{
        public static int ERROR_CODE_UNKNOWN = -1;
        public static int ERROR_CODE_UN_INIT = -2;
        public static int ERROR_CODE_NET_ERROR = -3;
        public static int ERROR_CODE_TOKEN = 401;
        public static int ERROR_CODE_LOGIN = 402;
        public static int ERROR_CODE_FILE_NOT_EXIST = 404;

    }
    public static class WebSocketCode{
        public static int CONNECT_SUCCESS = 1000; //连接成功
        public static int CONNECT_ERROR = 1008; //认证失败,token 错误
        public static int FLASHLIGHT_ON = 1101; //闪光灯开
        public static int FLASHLIGHT_OFF = 1102; //闪光灯关
        public static int VOICE_CALL_START = 1103; //语音通话开始
        public static int VOICE_CALL_END = 1104; //语音通话结束

        public static int EVENT_MSG = 1201; //消息事件


    }
}
